package acm.天梯赛练习2;

import java.util.Scanner;

public class I {
    public static void main(String[] args) {
//        System.out.println(fun(3, 6));
        int n=32768;
        int[][]dp=new int[4][n+1];
        for (int[] ints : dp) {
            ints[0]=1;
        }
        for (int i = 1; i<=3; i++) {
            for (int j = 1; j <= n; j++) {
                dp[i][j]+=(j-i)>=0?dp[i][j-i]:0;
                dp[i][j]+=dp[i-1][j];
            }
        }
        Scanner sc=new Scanner(System.in);
        while (sc.hasNext()){
            System.out.println(dp[3][sc.nextInt()]);
        }
    }

    public static int fun(int curr,int n){
        if (n==0){
            return 1;
        }
        if (n<0||curr<1){
            return 0;
        }
        return fun(curr,n-curr)+fun(curr-1,n);
    }
}
